@layout("/common/_vue_container.html"){
<div id="app" v-cloak v-loading="fullscreenLoading" style="height:100%;">
    <div class="main_content">
        <div v-loading="screenLoading">
            <div class="remind_title2">
                轮播图编辑
                <el-button
                        type="primary"
                        size="small"
                        class="product-new-button"
                        v-on:click="toBackList"
                >
                    返回
                </el-button>
            </div>
            <div style="height: 60px;line-height: 60px;font-size: 18px;">类别选择:</div>
            <el-select v-model="adCateId" clearable placeholder="请选择" size="mini">
                <el-option
                        v-for="item in cateList"
                        :key="item.id"
                        :label="item.name"
                        :value="item.id">
                </el-option>
            </el-select>
            <div style="height: 60px;line-height: 60px;font-size: 18px;">轮播图片:</div>
            <el-upload
                    class="avatar-uploader"
                    action="${ctxPath}/cash/uploadFile"
                    :show-file-list="false"
                    :on-progress="handleAvatarProcess"
                    :on-success="handleAvatarSuccess"
                    :before-upload="beforeAvatarUpload">
                <img v-if="adImgUrl" :src="adImgUrl" class="avatar">
                <div v-else>
                    <el-progress v-if="onProcess" type="circle" :percentage="uploadPercent">
                    </el-progress>
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                </div>
            </el-upload>
            <div style="height: 60px;line-height: 60px;font-size: 18px;">产品选择:</div>
            <div style="width: 178px;">
                <el-input
                        label="产品选择"
                        v-model="productName"
                        placeholder="通过选择产品获得"
                        :disabled="true"
                >
                </el-input>
            </div>
            <div style="margin: 12px 0">
                <el-button type="text" v-on:click="selectProduct">选择产品</el-button>
                <el-button type="text" v-on:click="clearProduct">清空</el-button>
            </div>
            <div style="height: 60px;line-height: 60px;font-size: 18px;">产品广告链接:</div>
            <div style="width: 250px;">
                <el-input
                        placeholder="请输入广告链接"
                        v-model="adProductH5Url"
                        clearable>
                </el-input>
            </div>
            <div style="height: 60px;line-height: 60px;font-size: 18px;">轮播状态:</div>
            <div>
                <div>
                    <el-radio-group v-model="isUsed">
                        <el-radio :label=1>启用</el-radio>
                        <el-radio :label=0>禁用</el-radio>
                    </el-radio-group>
                </div>
            </div>

            <div style="margin-top: 20px;">
                <el-button type="primary" v-on:click="updateAdInfo()">确 定</el-button>
            </div>
        </div>
    <el-dialog title="选择产品" :visible.sync="dialogFormVisible" width="60%">
        <el-form :inline="true" :model="queryContent" class="product-form-inline" size="small">
            <el-form-item label="关键词">
                <el-input v-model="queryContent.keyword" placeholder="产品名称"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" v-on:click="selectProduct">查询</el-button>
                <el-button v-on:click="resetQuery">重置</el-button>
            </el-form-item>
        </el-form>
        <el-row>
            <el-button
                    v-for="item in productData"
                    :key="item.id"
                    style="margin: 10px;"
                    v-on:click="getItemInfo(item.id,item.productName)"
            >
                {{item.productName}}
            </el-button>
        </el-row>
        <template>
            <el-pagination
                    background
                    v-on:current-change="handleCurrentChange"
                    :current-page.sync="pageNo"
                    :page-size="pageSize"
                    layout="total, prev, pager, next"
                    :total="total">
            </el-pagination>
        </template>
        <div slot="footer" class="dialog-footer">
            <el-button v-on:click="dialogFormVisible = false">取 消</el-button>
            <el-button type="primary" v-on:click="confirmGetInfo()">确 定</el-button>
        </div>
    </el-dialog>
</div>
<script src="${ctxPath}/static/modular/cash/ad/picture_edit.js"></script>
@}